Apache server getting lot of Closing connection

Apache server getting lot of Closing connection

am 14.02.2010 04:26:16 von Arunkumar Janarthanan

--00151747671a358fbb047f87101a
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have Apache server 2.2.6 running on RedHat Linux 5 with ProxyPass and
Reverse Proxy configured. The server limit has 512 connections.

Now that the number of connection has always Closing connection and when
load increases they make the maximum connection reached out. I used netstat
-a output to check what is causing this could not much understand if this is
caused by TIME_WAIT or the connections established to Tomcat not getting
released.

Please advice.

../apachectl_rd -V
Server version: Apache/2.2.6 (Unix)
Server built: Sep 26 2007 11:18:50
Server's Module Magic Number: 20051115:5
Server loaded: APR 1.2.11, APR-Util 1.2.10
Compiled using: APR 1.2.11, APR-Util 1.2.10
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)


../apachectl_rd -D DUMP_MODULES
Loaded Modules:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
include_module (static)
filter_module (static)
log_config_module (static)
env_module (static)
setenvif_module (static)
proxy_module (static)
proxy_connect_module (static)
proxy_ftp_module (static)
proxy_http_module (static)
proxy_ajp_module (static)
proxy_balancer_module (static)
ssl_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
rewrite_module (static)
so_module (static)
deflate_module (shared)
php5_module (shared)
remoteip_module (shared)
Syntax OK

--00151747671a358fbb047f87101a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,

I have Apache server 2.2.6 running on RedHat Linux 5 with ProxyP=
ass and Reverse Proxy configured. The server limit has 512 connections.
=

Now that the number of connection has always Closing connection and whe=
n load increases they make the maximum connection reached out. I used netst=
at -a output to check what is causing this could not much understand if thi=
s is caused by TIME_WAIT or the connections established to Tomcat not getti=
ng released.


Please advice.

./apachectl_rd -V
Server version: Apache/2.2.6=
(Unix)
Server built:   Sep 26 2007 11:18:50
Server's Module =
Magic Number: 20051115:5
Server loaded:=A0 APR 1.2.11, APR-Util 1.2.10 r>
Compiled using: APR 1.2.11, APR-Util 1.2.10
Architecture:   32-bit r>Server MPM:     Prefork
=A0 threaded:     no
  =
=A0 forked:     yes (variable process count)


./apachectl=
_rd -D DUMP_MODULES
Loaded Modules:

=A0core_module (static)
=A0authn_file_module (static)
=A0authn_defaul=
t_module (static)
=A0authz_host_module (static)
=A0authz_groupfile_mo=
dule (static)
=A0authz_user_module (static)
=A0authz_default_module (=
static)

=A0auth_basic_module (static)
=A0include_module (static)
=A0filter_mo=
dule (static)
=A0log_config_module (static)
=A0env_module (static) >=A0setenvif_module (static)
=A0proxy_module (static)
=A0proxy_connec=
t_module (static)

=A0proxy_ftp_module (static)
=A0proxy_http_module (static)
=A0proxy_a=
jp_module (static)
=A0proxy_balancer_module (static)
=A0ssl_module (s=
tatic)
=A0mpm_prefork_module (static)
=A0http_module (static)
=A0m=
ime_module (static)

=A0status_module (static)
=A0autoindex_module (static)
=A0asis_module=
(static)
=A0cgi_module (static)
=A0negotiation_module (static)
=
=A0dir_module (static)
=A0actions_module (static)
=A0userdir_module (=
static)
=A0alias_module (static)

=A0rewrite_module (static)
=A0so_module (static)
=A0deflate_module (s=
hared)
=A0php5_module (shared)
=A0remoteip_module (shared)
Syntax =
OK




--00151747671a358fbb047f87101a--

Re: Apache server getting lot of Closing connection

am 14.02.2010 16:58:50 von Arunkumar Janarthanan

--001517476470a8bcf4047f919391
Content-Type: text/plain; charset=ISO-8859-1

Could anyone please advice on this ?

On Sat, Feb 13, 2010 at 10:26 PM, Arunkumar Janarthanan <
arunkumar.webadmin@gmail.com> wrote:

> Hi,
>
> I have Apache server 2.2.6 running on RedHat Linux 5 with ProxyPass and
> Reverse Proxy configured. The server limit has 512 connections.
>
> Now that the number of connection has always Closing connection and when
> load increases they make the maximum connection reached out. I used netstat
> -a output to check what is causing this could not much understand if this is
> caused by TIME_WAIT or the connections established to Tomcat not getting
> released.
>
> Please advice.
>
> ./apachectl_rd -V
> Server version: Apache/2.2.6 (Unix)
> Server built: Sep 26 2007 11:18:50
> Server's Module Magic Number: 20051115:5
> Server loaded: APR 1.2.11, APR-Util 1.2.10
> Compiled using: APR 1.2.11, APR-Util 1.2.10
> Architecture: 32-bit
> Server MPM: Prefork
> threaded: no
> forked: yes (variable process count)
>
>
> ./apachectl_rd -D DUMP_MODULES
> Loaded Modules:
> core_module (static)
> authn_file_module (static)
> authn_default_module (static)
> authz_host_module (static)
> authz_groupfile_module (static)
> authz_user_module (static)
> authz_default_module (static)
> auth_basic_module (static)
> include_module (static)
> filter_module (static)
> log_config_module (static)
> env_module (static)
> setenvif_module (static)
> proxy_module (static)
> proxy_connect_module (static)
> proxy_ftp_module (static)
> proxy_http_module (static)
> proxy_ajp_module (static)
> proxy_balancer_module (static)
> ssl_module (static)
> mpm_prefork_module (static)
> http_module (static)
> mime_module (static)
> status_module (static)
> autoindex_module (static)
> asis_module (static)
> cgi_module (static)
> negotiation_module (static)
> dir_module (static)
> actions_module (static)
> userdir_module (static)
> alias_module (static)
> rewrite_module (static)
> so_module (static)
> deflate_module (shared)
> php5_module (shared)
> remoteip_module (shared)
> Syntax OK
>
>
>

--001517476470a8bcf4047f919391
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Could anyone please advice on this ?

On S=
at, Feb 13, 2010 at 10:26 PM, Arunkumar Janarthanan <<=
a href=3D"mailto:arunkumar.webadmin@gmail.com">arunkumar.webad min@gmail.com=
>
wrote:

204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,

I have=
Apache server 2.2.6 running on RedHat Linux 5 with ProxyPass and Reverse P=
roxy configured. The server limit has 512 connections.


Now that the number of connection has always Closing connection and whe=
n load increases they make the maximum connection reached out. I used netst=
at -a output to check what is causing this could not much understand if thi=
s is caused by TIME_WAIT or the connections established to Tomcat not getti=
ng released.



Please advice.

./apachectl_rd -V
Server version: Apache/2.2.6=
(Unix)
Server built:   Sep 26 2007 11:18:50
Server's Module =
Magic Number: 20051115:5
Server loaded:=A0 APR 1.2.11, APR-Util 1.2.10 r>

Compiled using: APR 1.2.11, APR-Util 1.2.10
Architecture:   32-bit r>Server MPM:     Prefork
=A0 threaded:     no
  =
=A0 forked:     yes (variable process count)


./apachectl=
_rd -D DUMP_MODULES
Loaded Modules:


=A0core_module (static)
=A0authn_file_module (static)
=A0authn_defaul=
t_module (static)
=A0authz_host_module (static)
=A0authz_groupfile_mo=
dule (static)
=A0authz_user_module (static)
=A0authz_default_module (=
static)


=A0auth_basic_module (static)
=A0include_module (static)
=A0filter_mo=
dule (static)
=A0log_config_module (static)
=A0env_module (static) >=A0setenvif_module (static)
=A0proxy_module (static)
=A0proxy_connec=
t_module (static)


=A0proxy_ftp_module (static)
=A0proxy_http_module (static)
=A0proxy_a=
jp_module (static)
=A0proxy_balancer_module (static)
=A0ssl_module (s=
tatic)
=A0mpm_prefork_module (static)
=A0http_module (static)
=A0m=
ime_module (static)


=A0status_module (static)
=A0autoindex_module (static)
=A0asis_module=
(static)
=A0cgi_module (static)
=A0negotiation_module (static)
=
=A0dir_module (static)
=A0actions_module (static)
=A0userdir_module (=
static)
=A0alias_module (static)


=A0rewrite_module (static)
=A0so_module (static)
=A0deflate_module (s=
hared)
=A0php5_module (shared)
=A0remoteip_module (shared)
Syntax =
OK






--001517476470a8bcf4047f919391--

Re: Re: Apache server getting lot of Closing connection

am 15.02.2010 00:40:32 von Igor Cicimov

--005045016abdc7fbb6047f98066c
Content-Type: text/plain; charset=ISO-8859-1

It's not very clear what are you saying. Please post some output from the
netstat command.

I guess you are talking about the back end connections between apache and
tomcat. What is the session time in your tomcat application? What are the
timeout settings in the apache config including KeepAlive and
KeepAliveTimeout settings (if any)? Check those and adjust according to your
needs.

According to RFC793 the time wait can be as twice the Maximum Segment
Lifetime (MSL). MSL is specified to be 2 minutes. So, a socket could be in a
TIME_WAIT state for as long as 4 minutes. So check your tcp kernel settings
for the sockets too. This command "ndd /dev/tcp \?" should give you all the
parameters so have a look and tune them if necessary.

Basically if you see lots of CLOSE_WAIT sockets on the apache towards the
tomcat that means the app has sent FIN request to close the connection but
the apache is still holding it open. So I would look at the apache timeouts
and the linux tcp kernel settings to correct this.

Hope this helps.

Igor


On Mon, Feb 15, 2010 at 2:58 AM, Arunkumar Janarthanan <
arunkumar.webadmin@gmail.com> wrote:

> Could anyone please advice on this ?
>
>
> On Sat, Feb 13, 2010 at 10:26 PM, Arunkumar Janarthanan <
> arunkumar.webadmin@gmail.com> wrote:
>
>> Hi,
>>
>> I have Apache server 2.2.6 running on RedHat Linux 5 with ProxyPass and
>> Reverse Proxy configured. The server limit has 512 connections.
>>
>> Now that the number of connection has always Closing connection and when
>> load increases they make the maximum connection reached out. I used netstat
>> -a output to check what is causing this could not much understand if this is
>> caused by TIME_WAIT or the connections established to Tomcat not getting
>> released.
>>
>> Please advice.
>>
>> ./apachectl_rd -V
>> Server version: Apache/2.2.6 (Unix)
>> Server built: Sep 26 2007 11:18:50
>> Server's Module Magic Number: 20051115:5
>> Server loaded: APR 1.2.11, APR-Util 1.2.10
>> Compiled using: APR 1.2.11, APR-Util 1.2.10
>> Architecture: 32-bit
>> Server MPM: Prefork
>> threaded: no
>> forked: yes (variable process count)
>>
>>
>> ./apachectl_rd -D DUMP_MODULES
>> Loaded Modules:
>> core_module (static)
>> authn_file_module (static)
>> authn_default_module (static)
>> authz_host_module (static)
>> authz_groupfile_module (static)
>> authz_user_module (static)
>> authz_default_module (static)
>> auth_basic_module (static)
>> include_module (static)
>> filter_module (static)
>> log_config_module (static)
>> env_module (static)
>> setenvif_module (static)
>> proxy_module (static)
>> proxy_connect_module (static)
>> proxy_ftp_module (static)
>> proxy_http_module (static)
>> proxy_ajp_module (static)
>> proxy_balancer_module (static)
>> ssl_module (static)
>> mpm_prefork_module (static)
>> http_module (static)
>> mime_module (static)
>> status_module (static)
>> autoindex_module (static)
>> asis_module (static)
>> cgi_module (static)
>> negotiation_module (static)
>> dir_module (static)
>> actions_module (static)
>> userdir_module (static)
>> alias_module (static)
>> rewrite_module (static)
>> so_module (static)
>> deflate_module (shared)
>> php5_module (shared)
>> remoteip_module (shared)
>> Syntax OK
>>
>>
>>
>

--005045016abdc7fbb6047f98066c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

It's not very clear what are you saying. Please post some output from t=
he netstat command.

I guess you are talking about the back end conne=
ctions between apache and tomcat. What is the session time in your tomcat a=
pplication? What are the timeout settings in the apache config including Ke=
epAlive and KeepAliveTimeout settings (if any)? Check those and adjust acco=
rding to your needs.


According to RFC793 the time wait can be as twice the Maximum
Segment Lifetime (MSL). MSL is specified to be 2 minutes. So, a socket
could be in a TIME_WAIT state for as long as 4 minutes. So check your tcp k=
ernel settings for the sockets too. This command "ndd /dev/tcp \?"=
; should give you all the parameters so have a look and tune them if necess=
ary.


Basically if you see lots of CLOSE_WAIT sockets on the apache towards t=
he tomcat that means the app has sent FIN request to close the connection b=
ut the apache is still holding it open. So I would look at the apache timeo=
uts and the linux tcp kernel settings to correct this.


Hope this helps.

Igor
=A0

O=
n Mon, Feb 15, 2010 at 2:58 AM, Arunkumar Janarthanan <=
;arunkumar.webadmin@gmail.c=
om
>
wrote:

204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Could anyone plea=
se advice on this ?


gmail_quote">
On Sat, Feb 13, 2010 at 10:26 PM, Arunkumar Janarthanan &=
lt;arunku=
mar.webadmin@gmail.com
>
wrote:

204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,

I have=
Apache server 2.2.6 running on RedHat Linux 5 with ProxyPass and Reverse P=
roxy configured. The server limit has 512 connections.



Now that the number of connection has always Closing connection and whe=
n load increases they make the maximum connection reached out. I used netst=
at -a output to check what is causing this could not much understand if thi=
s is caused by TIME_WAIT or the connections established to Tomcat not getti=
ng released.




Please advice.

./apachectl_rd -V
Server version: Apache/2.2.6=
(Unix)
Server built:   Sep 26 2007 11:18:50
Server's Module =
Magic Number: 20051115:5
Server loaded:=A0 APR 1.2.11, APR-Util 1.2.10 r>


Compiled using: APR 1.2.11, APR-Util 1.2.10
Architecture:   32-bit r>Server MPM:     Prefork
=A0 threaded:     no
  =
=A0 forked:     yes (variable process count)


./apachectl=
_rd -D DUMP_MODULES
Loaded Modules:



=A0core_module (static)
=A0authn_file_module (static)
=A0authn_defaul=
t_module (static)
=A0authz_host_module (static)
=A0authz_groupfile_mo=
dule (static)
=A0authz_user_module (static)
=A0authz_default_module (=
static)



=A0auth_basic_module (static)
=A0include_module (static)
=A0filter_mo=
dule (static)
=A0log_config_module (static)
=A0env_module (static) >=A0setenvif_module (static)
=A0proxy_module (static)
=A0proxy_connec=
t_module (static)



=A0proxy_ftp_module (static)
=A0proxy_http_module (static)
=A0proxy_a=
jp_module (static)
=A0proxy_balancer_module (static)
=A0ssl_module (s=
tatic)
=A0mpm_prefork_module (static)
=A0http_module (static)
=A0m=
ime_module (static)



=A0status_module (static)
=A0autoindex_module (static)
=A0asis_module=
(static)
=A0cgi_module (static)
=A0negotiation_module (static)
=
=A0dir_module (static)
=A0actions_module (static)
=A0userdir_module (=
static)
=A0alias_module (static)



=A0rewrite_module (static)
=A0so_module (static)
=A0deflate_module (s=
hared)
=A0php5_module (shared)
=A0remoteip_module (shared)
Syntax =
OK








--005045016abdc7fbb6047f98066c--